package com.cari.oa.domain;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 
* Title: AttachementEntity
* Description附件上传
* Company: cari 
* @author    hjx 
* @date       2013-1-31
 */
@Entity
@Table(name = "T_BUG_ATTACHEMENT")
public class SoftAttachementEntity implements Serializable {

    private static final long serialVersionUID = 8775225809962095596L;

    @Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;

    /**
     * 名称
     */
    @NotNull(message = "名称不能为空")
    @Length(max = 32, message = "名称长度要小于32个字符")
    private String name;
    
    
    /**
     * 名称
     */
    @NotNull(message = "名称不能为空")
    @Length(max = 32, message = "名称长度要小于32个字符")
    @Column(name="STORENAME")
    private String storeName;
    
    /**
     * 路径
     */
    @Column(name="PATH")
    private String path; 
    
    /**
     * 类型
     */
    @Column(name="TYPE")
    private String type;  
    
    /**
     * 创建时间
     */
	@Column(name = "CREATE_TIME")
    private Date createTime = new Date(); 
 
	/**
	 * 提交人
	 */
    @Column(name="SUBMITTER_ENNAME")
    private String submitterEnname;  
    
    /**
     * 所属bug
     */
    @Column(name="BUGID")
    private String bugId;
    
    /**
     * 任务Id
     */
    @Column(name="TASKID")
    private String taskId;
    
    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getSubmitterEnname() {
		return submitterEnname;
	}

	public void setSubmitterEnname(String submitterEnname) {
		this.submitterEnname = submitterEnname;
	}

	public String getBugId() {
		return bugId;
	}

	public void setBugId(String bugId) {
		this.bugId = bugId;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getStoreName() {
		return storeName;
	}

	public void setStoreName(String storeName) {
		this.storeName = storeName;
	}
}
